/* AI面试系统 - 自定义样式 */

:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --success-gradient: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  --danger-gradient: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
  --warning-gradient: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
  --info-gradient: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);

  --border-radius: 15px;
  --border-radius-lg: 20px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* 全局样式 */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
}

/* 导航栏样式 */
.navbar-brand {
  font-weight: 700;
}

.navbar-dark {
  background: var(--primary-gradient) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 卡片样式 */
.card {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
  border: none;
}

/* 按钮样式 */
.btn {
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--primary-gradient);
  border: none;
}

.btn-success {
  background: var(--success-gradient);
  border: none;
}

.btn-danger {
  background: var(--danger-gradient);
  border: none;
}

.btn-warning {
  background: var(--warning-gradient);
  border: none;
}

.btn-info {
  background: var(--info-gradient);
  border: none;
}

/* 表单样式 */
.form-control {
  border-radius: var(--border-radius);
  border: 2px solid #e9ecef;
  padding: 12px 15px;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-select {
  border-radius: var(--border-radius);
  border: 2px solid #e9ecef;
  padding: 12px 15px;
  transition: all 0.3s ease;
}

.form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* 徽章样式 */
.badge {
  border-radius: var(--border-radius);
  padding: 8px 12px;
}

/* 表格样式 */
.table {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.table th {
  border-top: none;
  font-weight: 600;
  color: #495057;
}

.table td {
  vertical-align: middle;
}

/* 进度条样式 */
.progress {
  border-radius: var(--border-radius);
  overflow: hidden;
}

.progress-bar {
  border-radius: var(--border-radius);
}

/* 警告框样式 */
.alert {
  border: none;
  border-radius: var(--border-radius);
}

/* 模态框样式 */
.modal-content {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: none;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.modal-footer {
  border-top: none;
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

/* 图标容器 */
.icon-container {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}

.icon-container.primary {
  background-color: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

.icon-container.success {
  background-color: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.icon-container.info {
  background-color: rgba(23, 162, 184, 0.1);
  color: #17a2b8;
}

.icon-container.warning {
  background-color: rgba(255, 193, 7, 0.1);
  color: #ffc107;
}

.icon-container.danger {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .card {
    margin: 10px;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn-group .btn {
    margin-bottom: 5px;
    border-radius: var(--border-radius);
  }
}

/* 加载动画 */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 打字动画 */
.typing-dots span {
  animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* 聊天消息样式 */
.message {
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  animation: fadeInUp 0.3s ease-out;
}

.message.user {
  justify-content: flex-end;
}

.message.ai {
  justify-content: flex-start;
}

.message-content {
  max-width: 70%;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  word-wrap: break-word;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message.user .message-content {
  background: var(--primary-gradient);
  color: white;
}

.message.ai .message-content {
  background-color: white;
  border: 1px solid #dee2e6;
  color: #495057;
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.5rem;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message.user .message-avatar {
  background: var(--primary-gradient);
  color: white;
}

.message.ai .message-avatar {
  background: var(--success-gradient);
  color: white;
}
